package main

import (
	"fmt"
)

type A struct {
	Name string
	age int
}

func (a *A) sayOK() {
	fmt.Println("A SayOK", a.Name)
}

func (a *A) hello() {
	fmt.Println("A hello", a.Name)
}

type B struct {
	A
}

func main() {

	var b B
	b.Name = "tom"
	b.age = 19
	b.A.sayOK()
	b.A.hello()
	b.sayOK()
	b.hello()

}